import { useDict } from '@/utils/dict/useDict'

export const searchList = [
  {
    type: 'input',
    name: '专家姓名',
    field: 'expertName',
  }
]

export const listColumns = [
  {
    title: '专家姓名',
    key: 'expertName',
  },
  {
    title: '专家类型',
    key: 'expertTypeName',
  },
  {
    title: '任聘单位',
    key: 'organization',
  },
  {
    title: '工作形式',
    key: 'workModeName',
  },
  {
    title: '任职状态',
    key: 'employmentStatusName',
  },
  {
    title: '任聘周期',
    key: 'startDate',
    render: (item,row) => {
      return row.startDate + '至' + row.endDate
    }
  },
]

export const actionArr = [
  {
    action: 'look',
    value: '查看',
  },
  {
    action: 'edit',
    value: '编辑',
  },
  {
    action: 'del',
    value: '删除',
  }
]
export const btnList = [
  {
    action: 'add',
    value: '新增',
    auth: ''
  }
];

export const rules = {
  expertName: [
    { required: true, message: '请选择专家姓名', trigger: 'change' }
  ],
  expertTypeId: [
    { required: true, message: '请选择专家类型', trigger: 'change' }
  ],
  expertFieldId: [
    { required: true, message: '请选择专家领域', trigger: 'change' }
  ],
  organization: [
    { required: true, message: '请输入任聘单位', trigger: 'blur' },
  ],
  workModeId: [
    { required: true, message: '请选择工作形式', trigger: 'change' }
  ],
  startDate: [
    { required: true, message: '请选择任聘周期', trigger: 'blur' }
  ],
  endDate: [
    { required: true, message: '请选择任聘周期', trigger: 'blur' }
  ],
  certificateFileId: [
    { required: true, message: '请上传职业资格证书', trigger: 'change' }
  ],
  employmentStatusId: [
    { required: true, message: '请选择任职状态', trigger: 'change' }
  ],
  opinionSummary: [
    { required: true, message: '请输入专家意见摘要', trigger: 'blur' },
  ],
  guidanceAchievements: [
    { required: true, message: '请输入指导成果', trigger: 'blur' },
  ]
}